package com.bed.lovewithpatientbed.util;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author xuxiaoding
 * @version 1.0.0
 * @ClassName LayUiUtil.java
 * @Description 于前端layui 框架相关的工具类
 */
public class LayUiUtil {

    /**
     * @title getLayTableResponseMap
     * @description 构造LayUI table 请求恢复Map，用于转Json
     * @author xuxiaoding
     * @param
     * @return
     * @throws
     */
    public static  <T> Map<String, Object> getLayTableResponseMap(String msg, int code, long count, List<T> data) {
        Map<String, Object> responseMap = new HashMap<>();
        responseMap.put("msg", msg);
        responseMap.put("code", code);
        responseMap.put("count", count);
        responseMap.put("data", data);

        return responseMap;
    }
}
